package me.exchange.com.modules.system.repository;

import me.exchange.com.modules.system.domain.Appt;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * @author zhaojing
 * @create2020/5/20
 */
public interface ApptRepository extends JpaRepository<Appt,Integer>, JpaSpecificationExecutor<Appt> {

    /**
     * 根据id查询姓名
     * @param id
     * @return
     */
    @Query(value = "select userName from sys_app_pro where id = ?1",nativeQuery = true)
    String findNameById(Integer id);
}
